package com.kasax.plugin.shadow

import com.android.build.gradle.BaseExtension
import com.android.build.gradle.LibraryPlugin
import com.kasax.plugin.shadow.utils.LogUtils
import org.gradle.api.Plugin
import org.gradle.api.Project

class TestALibraryPlugin implements Plugin<Project> {
    private static final String LOG_TAG = "TestPlugin"

    void apply(Project project) {
        LogUtils.d(LOG_TAG, "apply")

        // 注册 CustomLogTransform
        def android = project.extensions.getByType(BaseExtension)
        android.registerTransform(new CustomLogTransform())

        LogUtils.d(LOG_TAG, "use in other module")
    }
}